package com.uls.ycl.service.impl;

import java.util.List;
import com.uls.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.uls.ycl.mapper.NoticeReminderMapper;
import com.uls.ycl.domain.NoticeReminder;
import com.uls.ycl.service.INoticeReminderService;

/**
 * 通知提醒Service业务层处理
 * 
 * @author ycl
 * @date 2024-11-08
 */
@Service
public class NoticeReminderServiceImpl implements INoticeReminderService 
{
    @Autowired
    private NoticeReminderMapper noticeReminderMapper;

    /**
     * 查询通知提醒
     * 
     * @param id 通知提醒主键
     * @return 通知提醒
     */
    @Override
    public NoticeReminder selectNoticeReminderById(Long id)
    {
        return noticeReminderMapper.selectNoticeReminderById(id);
    }

    /**
     * 查询通知提醒列表
     * 
     * @param noticeReminder 通知提醒
     * @return 通知提醒
     */
    @Override
    public List<NoticeReminder> selectNoticeReminderList(NoticeReminder noticeReminder)
    {
        return noticeReminderMapper.selectNoticeReminderList(noticeReminder);
    }

    /**
     * 新增通知提醒
     * 
     * @param noticeReminder 通知提醒
     * @return 结果
     */
    @Override
    public int insertNoticeReminder(NoticeReminder noticeReminder)
    {
        noticeReminder.setCreateTime(DateUtils.getNowDate());
        return noticeReminderMapper.insertNoticeReminder(noticeReminder);
    }

    /**
     * 修改通知提醒
     * 
     * @param noticeReminder 通知提醒
     * @return 结果
     */
    @Override
    public int updateNoticeReminder(NoticeReminder noticeReminder)
    {
        noticeReminder.setUpdateTime(DateUtils.getNowDate());
        return noticeReminderMapper.updateNoticeReminder(noticeReminder);
    }

    /**
     * 批量删除通知提醒
     * 
     * @param ids 需要删除的通知提醒主键
     * @return 结果
     */
    @Override
    public int deleteNoticeReminderByIds(Long[] ids)
    {
        return noticeReminderMapper.deleteNoticeReminderByIds(ids);
    }

    /**
     * 删除通知提醒信息
     * 
     * @param id 通知提醒主键
     * @return 结果
     */
    @Override
    public int deleteNoticeReminderById(Long id)
    {
        return noticeReminderMapper.deleteNoticeReminderById(id);
    }
}
